<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>

<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet"/>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp">
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">该页面展示了添加职位类别 。</div>
</div>
</div>

  <div class="infoboxp_top mt10">
    <h6>添加类别</h6>
	  <div class="infoboxp_right">
	<a href=" javascript:history.back(-1);" class="infoboxp_tj">类别列表</a>
	</div>
  </div>
  <div class="admin_table_border">
    <iframe id="supportiframe"  name="supportiframe"  onload="returnmessage('supportiframe');" style="display:none"></iframe>
    <form name="myform" action="index.php?m=admin_job&c=save" method="post"  onSubmit="return save();" target="supportiframe" class="layui-form">
      <table width="100%" class="table_form" style="background:#fff;">
        <tr >
          <th width="120">类别名称：</th>
          <td><input class="input-text" type="text" id="position" name="position" size="40" value="{yun:}$info.name{/yun}"/></td>
        </tr>

        <tr class="admin_table_trbg" >
          <th>一级分类：</th>
          <td>
            <div class="layui-form-item">
              <div class="layui-input-inline">
                <select name="nid" lay-filter="nid">
                  <option value="">请选择</option>
                  {yun:}foreach item=one from=$position{/yun}
                  <option value="{yun:}$one.id{/yun}"
                   {yun:}if $job.keyid == $one.id{/yun}
                   selected
                   {yun:}/if{/yun}
                   >{yun:}$one.name{/yun}
                  </option>
                  {yun:}/foreach{/yun}
                </select>
              </div>
            </div>      
          </td>
        </tr>
        <tr >
          <th>二级分类：</th>
          <td>  
            <div class="layui-form-item">
              <div class="layui-input-inline">
                <select name="keyid" lay-filter="keyid" id="keyid_select">
                  <option value="">请选择</option>
                  {yun:}foreach item=two from=$class2{/yun}
                  <option value="{yun:}$two.id{/yun}"
                   {yun:}if $info.keyid == $two.id{/yun}
                   selected
                   {yun:}/if{/yun}
                   >{yun:}$two.name{/yun}
                  </option>
                  {yun:}/foreach{/yun}
                </select>
              </div>
            </div>
          </td>
        </tr>
        <tr class="admin_table_trbg" id="content">
          <th>自定义描述： </th>
          <td><textarea  id="intro" name="content" style="width:500px; height:150px;">{yun:}$info.content{/yun}</textarea></td>
        </tr>
        <tr>
          <th>排序：</th>
          <td><input class="input-text" type="text" name="sort" value="{yun:}$info.sort{/yun}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"/>
            越小越在前</td>
        </tr>
        <tr class="admin_table_trbg" >
          <td align="center" colspan="2"> {yun:}if $info.id{/yun}
            <input type="hidden" name="id"   value="{yun:}$info.id{/yun}"/>
            <input class="admin_button" type="submit" name="submit" value="&nbsp;更 新&nbsp;"  />
            {yun:}else{/yun}
            <input class="admin_button" type="submit" name="submit" value="&nbsp;添 加&nbsp;"  />
            {yun:}/if{/yun}
            <input class="admin_button" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" /></td>
        </tr>
      </table>
       <input type="hidden" name="pytoken" id="pytoken" value="{yun:}$pytoken{/yun}">	  
    </form>
  </div>
</div>
<script type="text/javascript">
	layui.use(['form'], function(){
		var form = layui.form
			,$ = layui.$;

		form.on('select(nid)', function(data){
			var pytoken=$("#pytoken").val(); 
			$.post("index.php?m=admin_job&c=get_class", {nid:data.value,pytoken:pytoken,use_layui:1},function(data) {
				$("#keyid_select").html(data);
				form.render();
			})
		});
	})
	function save(){
		var position=$("#position").val();
		if($.trim(position)==''){
			parent.layer.msg('类别名称不能为空！', 2, 8);return false;
		}
	}
</script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.config.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.all.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script language="javascript">
	var editor = UE.getEditor('intro',{
		toolbars:[[ 'Source','|', 'Undo', 'Redo','Bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'fontfamily', 'fontsize',  'forecolor', 'backcolor', 'removeformat', 'autotypeset', 'pasteplain', '|','insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|','simpleupload', '|','link', 'unlink', 'indent', '|','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify']],wordCount:false,elementPathEnabled:false,initialFrameHeight:200
	});
</script>

</body>
</html>